<?php
/**
 * Created by PhpStorm.
 * User: zhangligang
 * Date: 17/4/22
 * Time: 下午2:11
 */

namespace App\Http\Models;

use Illuminate\Database\Eloquent\Model;

/**
 * 评论
 * Class Comment
 * @package App\Http\Models
 */
class Comment extends Model
{
    /**
     * table name
     * @var string
     */
    protected $table = 'app_comment';

    protected $fillable = ['*'];

    public function getType($type = null)
    {

        $options = [
            '回复', '商品', '文章', '订单'
        ];

        return $type === null ? $options : $options[$type];
    }

}